# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=libks
pkgver=1.7.0
pkgrel=2
pkgdesc="Foundational support for signalwire C products"
url="https://github.com/signalwire/libks"
arch="all"
license="MIT"
makedepends="cmake util-linux-dev openssl-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/signalwire/libks/archive/refs/tags/v$pkgver.tar.gz
disable-failing-tests.patch"

build() {
	cmake \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
	.
	make
}

check() {
	ctest
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
d5e1244f1c42b22684cb342d6007dd6ed84f39466631d1fb198e4d57e374a8014a957bae74f2ea62cfdc8824564f21c417e984101640d938fc12471f4ffcc2cc  libks-1.7.0.tar.gz
2b9dcde2423531ce9677780c8bd1781450ace473fb9e176fd7449deeef51dc323af9825011f856e3494a7efaf688aff802b7c58105d65e3d21c22bfc71cffbaa  disable-failing-tests.patch
"
